﻿using System.Collections.Generic;
using System.Web.Http;
using ASP.NetAjaxApplication.Models;

namespace ASP.NetAjaxApplication.Controllers
{
    public class OrderController : ApiController
    {
        // GET api/lineitem
        public IEnumerable<LineItemModel> Get()
        {
            return Repository.LineItems.GetAll();
        } 

        // GET api/lineitem/5
        public string Get(int id)
        {
            return "value";
        }

        // POST api/lineitem
        public void Post(OrderModel data)
        {
            Repository.Order.Insert(data);
        }

        // PUT api/lineitem/5
        public void Put(int id, [FromBody]string value)
        {
        }

        // DELETE api/lineitem/5
        public void Delete(int id)
        {
        }
    }
}